const http = require('http')
const fs = require('fs')
const mysql = require('mysql')
const regexps = require('../lib/reg')
const url = require('url')
const io = require('socket.io')

let db = mysql.createPool({
    host: '',
    user: 'root',
    password: '',
    port: '3308',
    database: 'test'
})

let httpServer = http.createServer((req, res) => {
    const { pathname, query } = url.parse(req.url, true)

    fs.readFile(`www${pathname}`)
})

httpServer.listen(4010)
console.log(`http server running at http://localhost:4010`)